<#import "../template.ftl" as t/>
<@t.html ; part>
    <#if part="head">
        <link href="<@spring.url "/resources/plugins/datatables/dataTables.bootstrap.css"/>" rel="stylesheet">
        <link href="<@spring.url "/resources/plugins/datatables/responsive.dataTables.min.css"/>" rel="stylesheet">
    </#if>
    <#if part="body">
        <div class="panel">
            <div class="panel-heading">
                <h3 class="panel-title"></h3>
            </div>
            <div class="panel-body">
                <table id="dt-basic" class="table table-striped table-bordered"
                       cellspacing="0" width="100%">
                    <thead>
                    <tr>
                        <th><input type="checkbox" /></th>
                        <th>公司名称</th>
                        <th>电压等级(kV)</th>
                        <th class="min-tablet">结算电量(万MWh)</th>
                        <th class="min-desktop">结算价(元/Mwh)</th>
                        <th class="min-desktop">客户地区</th>
                        <th class="min-desktop">签约模式</th>
                        <th class="min-desktop">销售</th>
                        <th class="min-desktop">资料</th>
                    </tr>
                    </thead>
                    <tbody>
            <#if pageData.content?? && (pageData.content?size>0)>
                <#list pageData.content as data>
                    <tr>
                        <td><input type="checkbox" /></td>
                        <td><a href="<@spring.url "/manage/companyInfo/edit/${data.companyInfoId}"/>">${(data.name)!}</a></td>
                        <td><input type="text" class="form-control"></td>
                        <td><input type="text" class="form-control"></td>
                        <td>${(data.cityParent.name)!} ${(data.city.name)!}</td>
                        <td>
                            <#if data.planType == 1>1:9分成
                            <#elseif data.planType == 2>全返
                            <#else>
                                <#if (data.contractSetting??)>
                                    <#if data.contractSetting.cooperationType == 1>
                                        ${(100-(data.contractSetting.baseRate1)!0)/10}:${((data.contractSetting.baseRate1)!0)/10}分成
                                    <#elseif data.contractSetting.cooperationType == 2>
                                        保底 ${(data.contractSetting.bottomPrice)!}
                                    </#if>
                                </#if>
                            </#if>
                        </td>
                        <td>${(data.admin.name)!}</td>
                        <td></td>
                    </tr>
                </#list>
            </#if>
                    </tbody>
                </table>
            </div>
        </div>

    </#if>
    <#if part="modal">
    </#if>

    <#if part="foot_script">
        <script src="<@spring.url "/resources/plugins/datatables/jquery.dataTables.js"/>"></script>
        <script src="<@spring.url "/resources/plugins/datatables/dataTables.bootstrap.js"/>"></script>
        <script src="<@spring.url "/resources/plugins/datatables/dataTables.responsive.min.js"/>"></script>
        <script src="<@spring.url "/resources/js/tables-datatables.js"/>"></script>
        <script type="text/javascript">
            //$(document).ready( function() {
            $('#dt-basic').dataTable( {
                "fnDrawCallback":function (settings) {
                    $("#dt-basic thead tr th:first").removeClass("sorting_asc");
                    $("#dt-basic tbody tr td:first").removeClass("sorting_asc");
                },
                "aoColumnDefs":[{"bSortable":false, "aTargets":[0]}]
            });
            //});
        </script>

    </#if>
</@t.html>